package com.management.department.teacherinfosystem.Repository;

import com.management.department.teacherinfosystem.Entity.StudentGuidance;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface StudentGuidanceRepository extends JpaRepository<StudentGuidance, Long>, JpaSpecificationExecutor<StudentGuidance> {
    @EntityGraph(attributePaths = {"user", "achievements"})
    Optional<StudentGuidance> findWithUserAndAchievementsById(Long id);
} 